import request from '@/utils/http'

const baseUrl = process.env.VUE_APP_JAVA_URL

const api = {
  list: baseUrl + '/syslog/queryLogList',
  getLog: baseUrl + '/syslog/getLogById',
  saveLog: baseUrl + '/syslog/saveSysLog',
  deleteLog: baseUrl + '/syslog/deleteLogByDate',
  getLogType: baseUrl + '/sysparam/getParamListByType'
}

export function queryList (params) {
  return request({
    url: api.list,
    method: 'post',
    data: params
  })
}

export function getLogType (params) {
  return request({
    url: api.getLogType,
    method: 'post',
    data: params
  })
}

export function getLog (params) {
  return request({
    url: api.getLog,
    method: 'post',
    data: params
  })
}

export function saveLog (params) {
  return request({
    url: api.saveLog,
    method: 'post',
    data: params
  })
}

export function deleteLog (params) {
  return request({
    url: api.deleteLog,
    method: 'post',
    data: params
  })
}
